import {request} from "@@/exports";
import {getTenantId} from "@/services";

export async function login(params: Login.LoginParams) {
  return request<API.Result>('/api/auth/oauth/token', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-Tenant-Id': getTenantId(),
    },
    params,
  });
}
